package com.itheima_11;

public class GenericDemo {
    public static void main(String[] args) {
        Student s = new Student("张三");
        System.out.println(s.getName());

        Teacher t = new Teacher(30);
        System.out.println(t.getAge());

        System.out.println("----------");

        Generic<String> g1 = new Generic<String>();
        g1.setT("李四");
        System.out.println(g1.getT());

        Generic<Integer> g2 = new Generic<Integer>();
        g2.setT(29);
        System.out.println(g2.getT());

        Generic<Boolean> g3 = new Generic<Boolean>();
        g3.setT(false);
        System.out.println(g3.getT());
    }
}
